#ifndef SEMANTICNODECREATEARRAY_H_
#define SEMANTICNODECREATEARRAY_H_

#include "SemanticNode.h"
#include "ValueType.h"
#include <vector>

class SemanticNodeExpression;

class SemanticNodeCreateArray : public SemanticNode, public ValueType {
private:
	std::vector<const SyntaxTreeNode *> dimensionExpressions;
	std::vector<const SyntaxTreeNode *> initializationExpressions;
	std::vector<SemanticNodeExpression *> dimensions;
	std::vector<SemanticNodeExpression *> initializers;

	void extractInitializers(const SyntaxTreeNode *initializationNode);

public:
	SemanticNodeCreateArray(const SyntaxTreeNode *createArrayNode, SemanticNode *parent);

	std::vector<const SyntaxTreeNode *> getDimensionExpressions() const;
	std::vector<const SyntaxTreeNode *> getInitializationExpressions() const;

	void addDimension(SemanticNodeExpression *dimension);
	void addInitializer(SemanticNodeExpression *initializer);

	virtual std::string toDebugString(int tab);
};

#endif